﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Photography
{
    public class SubdomainHttpModule : IHttpModule
    {
        private log4net.ILog Logger { get { return log4net.LogManager.GetLogger(this.GetType()); } }

        private string _subDomain = null;

        void IHttpModule.Dispose()
        {
        }

        public void Init(HttpApplication context)
        {
            context.BeginRequest += new EventHandler(OnBeginRequest);
            context.EndRequest += new EventHandler(OnEndRequest);
        }

        public void OnBeginRequest(object sender, EventArgs e)
        {
            /*if (_subDomain == null)
                _subDomain = UrlUtilities.SubDomain;
            else if (_subDomain != UrlUtilities.SubDomain)
            {
                HttpRuntime.UnloadAppDomain();
                HttpApplication app = sender as HttpApplication;
                app.Response.Redirect(app.Request.Path);
            }*/
        }

        public void OnEndRequest(object sender, EventArgs e)
        {
        }
    }
}